import request from '@/utils/request'

// 查询优惠券领取记录列表
export function listRecord(query) {
  return request({
    url: '/pc/couponRecord/pageList',
    method: 'get',
    params: query
  })
}

// 查询优惠券领取记录详细
export function getRecord(id) {
  return request({
    url: '/pc/couponRecord/info/' + id,
    method: 'get'
  })
}

// 新增优惠券领取记录
export function addRecord(data) {
  return request({
    url: '/pc/couponRecord/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改优惠券领取记录
export function updateRecord(data) {
  return request({
    url: '/pc/couponRecord/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除优惠券领取记录
export function delRecord(id) {
  return request({
    url: '/pc/couponRecord/delete' + id,
    method: 'delete'
  })
}
